<?php require('connections/con_gl.php'); ?>
<?php
cekAkses($_SESSION[akses],"DD-7-1");

mysql_select_db($database_con_gl, $con_gl);
$query_klas1 = "SELECT id, gudang FROM gl_gudang ORDER BY gudang ASC";
if(!strstr($_SESSION[akses],'A-1-4')) {
	$query_gudang .= " where id='$_SESSION[lokasi]'";
}
$klas1 = mysql_query($query_klas1, $con_gl) or die(mysql_error());
$row_klas1 = mysql_fetch_assoc($klas1);
$totalRows_klas1 = mysql_num_rows($klas1);

?>
<link href="ccss/ui.datepicker.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/ui.datepicker.js"></script>
<script type="text/javascript">

function checktipecustomer(val) {
	if(val=='Corporate') {
		document.getElementById('jeniskelamin').value=null;	
		document.getElementById('jeniskelamin').disabled='disabled';		
		document.getElementById('tempatlahir').value=null;	
		document.getElementById('tempatlahir').disabled='disabled';		
		document.getElementById('tgllahir').value=null;	
		document.getElementById('tgllahir').disabled='disabled';		
	}else{
		document.getElementById('jeniskelamin').disabled='';		
		document.getElementById('tempatlahir').disabled='';		
		document.getElementById('tgllahir').disabled='';		
	}
}

<!--
$(function()
      {
        $('.calendar').datepicker({
            appendText : "",
            dateFormat : 'yy/mm/dd'
          });
      });
	  
</script>
<script type="text/javascript" src="js/ajax_data.js"></script>
<script type="text/javascript">
$(document).ready(function() {

	$().ajaxStart(function() {
		$('#loading').show();
		$('#result').hide();
	}).ajaxStop(function() {
		$('#loading').hide();
		$('#result').fadeIn('slow');
	});

	$('#add').submit(function() {
		$.ajax({
			type: 'POST',
			url: $(this).attr('action'),
			data: $(this).serialize(),
			success: function(data) {
				$('#result').html(data);
			}
		})
		return false;
	});
  $('#result').click(function(){
  $(this).hide();
  });
})
</script>
<script>
function sendRespondCabang() {
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('divJenis');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
		if (ajaxRequest.readyState == 3) {
			var ajaxDisplay = document.getElementById('divJenis');
			ajaxDisplay.innerHTML = "<img src='images/ajax-loader.gif' />";
		}
	}
	ajaxRequest.open("GET", "include/send_respondcabang.php", true);
	ajaxRequest.send(null);	
}
</script>

<div id="loading" style="display:none;"><img src="images/loading.gif" alt="loading..." /></div>
<div id="result" style="display:none;"></div>
<h1>Tambah Usulan Perubahan Dokumen</h1>
<form action="proses/customerretail.php?act=add" method="POST" name="add" id="add" >
  <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
    
    <tr>
      <td align="right">&nbsp;</td>
      <td colspan="2" align="right" bgcolor="#DDDDDD"><div align="left"><strong>I. Usulan Perubahan Document</strong></div></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td colspan="2" bgcolor="#DDDDDD"><strong>III. Review MR- Top Management</strong></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td align="right">&nbsp;</td>
      <td align="right" bgcolor="#DDDDDD"><div align="left">Pemohon</div></td>
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Approval : </div></td>
      <td bgcolor="#FFFFFF"><select name="statuscustomer" id="statuscustomer" style="width:180px;">
        <option value="DISETUJUI" selected="selected">DISETUJUI</option>
        <option value="TIDAK DISETUJUI">TIDAK DISETUJUI</option>
      
      </select></td>
      <td width="1%" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="right" valign="top" bgcolor="#FFFFFF">Nama* :</td>
      <td width="27%" valign="top" bgcolor="#FFFFFF"><input name="nama" type="text" id="nama" size="37" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td width="13%" bgcolor="#FFFFFF"><div align="right">Alasan : : </div></td>
      <td width="22%" rowspan="2" bgcolor="#FFFFFF"><textarea name="alamat5" cols="35" rows="2" id="alamat5"></textarea></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td width="7%" align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="right" valign="top" bgcolor="#FFFFFF">Unit Bisnis* :</td>
      <td valign="top" bgcolor="#FFFFFF"><input name="nama2" type="text" id="nama2" size="37" maxlength="100" /></td>
      <td width="1%" bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
      </td>
      <td width="11%" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="right" bgcolor="#FFFFFF"> Jabatan* : </td>
      <td bgcolor="#FFFFFF"><input name="nama3" type="text" id="nama3" size="37" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#DDDDDD">Status</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    
    <tr valign="top">
      <td height="35" align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td width="18%" align="right" bgcolor="#DDDDDD"><div align="left"><strong>Informasi Document</strong></div></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Status Pengajuan</div></td>
      <td bgcolor="#FFFFFF"><select name="statuscustomer2" id="statuscustomer2" style="width:180px;">
        <option value="PENDING APPROVAL REQUEST" selected="selected">PENDING APPROVAL REQUEST</option>
        <option value="IN PROGRESS APPROVAL">IN PROGRESS APPROVAL</option>
        <option value="IN PROGRESS CREATED">IN PROGRESS CREATED</option>
      </select></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr valign="top">
      <td height="64" rowspan="2" align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td rowspan="2" align="right" bgcolor="#FFFFFF"><div align="right">Nomor Document : </div>
      <p>Judul Document</p></td>
      <td rowspan="2" bgcolor="#FFFFFF"><p>
        <input name="nama4" type="text" id="nama4" size="37" maxlength="100" />
      </p>
      <p>
        <input name="nama5" type="text" id="nama5" size="37" maxlength="100" />
      </p></td>
      <td rowspan="2" bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td rowspan="3" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr valign="top">
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td colspan="2" align="right" bgcolor="#DDDDDD"><div align="left"><strong>II. Isi - Bagian Yang Dirubah</strong></div></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#DDDDDD"><strong>Data Pemeriksa</strong></td>
      <td bgcolor="#DDDDDD">&nbsp;</td>
    </tr>
    
    
    <tr>
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="right" bgcolor="#FFFFFF"><div align="right">Tertulis Pada Documen</div></td>
      <td bgcolor="#FFFFFF"><textarea name="alamat2" cols="35" rows="2" id="alamat2"></textarea></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF"><div align="right">Nama Pemeriksa : </div></td>
      <td valign="top" bgcolor="#FFFFFF"><textarea name="alamat1" cols="35" rows="2" id="alamat1"></textarea></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="right" bgcolor="#FFFFFF"><div align="right">Usulan Perubahan</div></td>
      <td bgcolor="#FFFFFF"><textarea name="alamat3" cols="35" rows="2" id="alamat3"></textarea></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Nama Persetujuan: </div></td>
      <td bgcolor="#FFFFFF"><textarea name="alamat6" cols="35" rows="2" id="alamat6"></textarea></td>
      <td rowspan="2" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="left" bgcolor="#FFFFFF"><div align="right">Usulan Perubahan</div></td>
      <td bgcolor="#FFFFFF"><textarea name="alamat4" cols="35" rows="2" id="alamat4"></textarea></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    
    <tr>
      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    
    <tr>
      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
      <td align="left" bgcolor="#FFFFFF"><em>*Harus diisi</em></td>
      <td bgcolor="#FFFFFF"><label>
        <input name="Save" type="submit" id="Save" value="Simpan" />
        </label>
          <label>
          <input type="button" name="Button" value="Batal" onClick="javascript:history.go(-1);">
        </label></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
  </table>
</form>
